In the get incidents API, if you use since parameter, then the API ignores the service ID params.
If I query with a since parameter, I end up getting all sorts of incidents since that date. My service ID filters are ignored.
In the get incidents API, if you use since parameter, then the API ignores the service ID params.
If I query with a since parameter, I end up getting all sorts of incidents since that date. My service ID filters are ignored.
Could you please send us the API request you’re making, so we can look over why this might be occurring?
Hi Tom,
I don’t know how to share details since I can’t share my API key.
But this is what the API url looks like:
https://api.pagerduty.com/incidents?serviceIds[]=PHM7I0G&serviceIds[]=PCT97LP&limit=50&offset=0&since=2019-04-18T16:12:52.039Z
But if you inspect the response, then this is what you see:
> response.incidents.map(i => i.service.id)
(6) ["P05S1BN", "PAZ3SV4", "P5IX87X", "P5RZCF7", "P5RZCF7", "P8TYV6H"]
As you see its returning incidents from various services other than the two requested PHM7I0G and PCT97LP.
-Shobhit
Oh wow. Actually figured it out.
My parameter is wrong. It should be service_ids instead of serviceIds.
This issue is resolved. Thanks.
Hi Shobhit,
I was just trying to reproduce when I saw this comment. Thank you for letting us know! I am glad to hear that it’s behaving as you’d expect now